Modeling of Textile Dye Removal from Wastewater Using Innovative Oxidation Technologies (Fe(II)/Chlorine and H2O2/Periodate Processes): Artificial Neural Network-Particle Swarm Optimization Hybrid Model

An efficient optimization technique based on a metaheuristic and an artificial neural network (ANN) algorithm has been devised. Particle swarm optimization (PSO) and ANN were used to estimate the removal of two textile dyes from wastewater (reactive green 12, RG12, and toluidine blue, TB) using two unique oxidation processes: Fe(II)/chlorine and H2O2/periodate. A previous study has revealed that operating conditions substantially influence removal efficiency. Data points were gathered for the experimental studies that developed our ANN-PSO model. The PSO was used to determine the optimum ANN parameter values. Based on the two processes tested (Fe(II)/chlorine and H2O2/periodate), the proposed hybrid model (ANN-PSO) has been demonstrated to be the most successful in terms of establishing the optimal ANN parameters and brilliantly forecasting data for RG12 and TP elimination yield with the coefficient of determination (R2) topped 0.99 for three distinct ratio data sets.


INTRODUCTION
To remove organic pollutants, nutrients, and other impurities, a typical wastewater treatment plant uses a variety of physical, chemical, and biological unit processes. Detritus that is solubilized by microorganisms may only be removed using natural treatment. 1,2 Industrial effluents are sometimes more challenging because of high organic matter content, nonneutral pHs, salinity, or the inclusion of synthetic chemicals with long persistence and low biodegradability. 3 This treatment chain is suitable for the majority of household wastewaters. One of the most common occurrences is wastewater from the textile industry. The color is still discernible at low concentrations (less than 1 ppm for some dyes). 4−7 Toxic, carcinogenic, mutagenic, or teratogenic compounds are often found in textile wastewater. For the most part, the chromophore grouping of a dye is employed to sort it out. Although anthraquinone, xanthene, phthalocyanine, and sulfur are also utilized, most chemicals are azo (−NN−) derivatives. 8 Some substances may alter wastewater treatment facilities, leading to more stable and harmful organisms, or they may not change and remain unchanged. For decades, scientists have been working to create advanced oxidation processes (AOPs) that are more environmentally friendly. 9,10 Hydroxyl radical • OH, a potent oxidant (E°= 2,8 V) and highly reactive species to most organic contaminants in situ, is produced by AOPs. AOPs include the Fenton system (Fe(II)/H 2 O 2 ), UV/ H 2 O 2 , H 2 O 2 /O 3 , UV/O 3 , and UV/TiO 2 . 11 An alternative to H 2 O 2 and UV has recently been explored: the UV/chlorine procedure. It has been tried in a pilot or full-scale plant for water treatment, drinking water processing, and groundwater remediation. 12 In this process, several free radicals, including • OH, Cl 2 •− , and ClO • , are generated to collectively remove micropollutants at a much faster rate. Micropollutant elimination is an important goal for environmentalists and scientists alike. Utilizing multiple free radicals in a novel class of oxidation processes is one way to achieve this goal. 13 As with UV/chlorine, UV/periodate acts as a multifree radical generator, producing radicals such as IO 3 • , IO 4 • , • OH, IO 3 , O( 3 P), O 3 , and H 2 O 2 for the removal of a variety of water contaminants. 14−17 To integrate the results of experiments, mathematic models were regarded as appropriate. Kinetic modeling models have many constraints because of their complicated nature and nonlinearity, limiting the parameters. 18−27 Scientists have put out fuzzy logic (FL) models, artificial neural networks (ANNs), and other ML techniques. The latter have been applied to processes in several studies. 28−36 Machine learning (ML) offers practical solutions to solve challenging issues in various industrial applications. 4 ML includes computer algorithms and statistical methods required for data-driven control, estimation, prediction, classification, or clustering. 37 Although it is not practicable, complicated problems that were difficult to describe and analyze may now be appraised using these methods. 38 Several ANNs, such as a multilayer perceptron, are based on the human brain (MLP). This rigorous mathematical model often used in ML may explain any nonlinear relationship between input and output sets. An ANN is a collection of neurons linked by two fundamental parameters (connection weights and thresholds). 39−41 Neural network techniques such as Levenberg−Marquardt (LM), scaled gradient descent (SGD), and gradient descent with momentum (GDWM) are among the most often employed (GDM). Adaptation, learning, and generalization may occur even when working with nonlinear functions. Contrarily, the speed of convergence of BPNN algorithms is slow. Some metaheuristic optimization approaches, such as the genetic algorithm (GA), firefly algorithm (FA), ant colony optimization (ACO), particle swarm optimization (PSO), and differential evolution (DE), may be utilized to solve these problems. They help the ANN find more optimal solutions faster, increasing its overall efficiency. Techniques like PSO and GA illustrate this trend. 40,41 To cope with the most complex and complicated issues in optimization, they are the most promising global optimization approaches. 42−46 They have recently discovered two new oxidation methods for efficiently removing textile colors from wastewater. 47,48 These two reactions, Fe(II)/chlorine and H 2 O 2 /periodate, have been discovered as multiple sources of free-radical oxidation of organic contamination. Cl • , ClO • , and Cl 2 •− chlorine radicals have been implicated in the Fe(II)/Chlorine process, 38 To degrade RG12 and TB textile colors fast, we used Fe(II)/chlorine and H 2 O 2 /periodate processes. Several operational variables, including as reagent dosages, solution temperature, and pH, were examined throughout a wide range of reaction times. Industrial applications need a modeling technique that maximizes the efficiency of both kinetic processes.
This work aimed to develop a hybrid model (ANN-PSO) for the case of the removal of RG12 and TB dyes from wastewater utilizing Fe(II)/chlorine and H 2 O 2 /periodate oxidation processes. The PSO metaheuristic optimization was combined with ANN to construct a feasible model for predicting and optimizing the removal of textile colors from wastewater effluent using Fe(II)/chlorine and H 2 O 2 /periodate, respectively. The model's adaptability and durability were shown using the R 2 coefficient and the root mean square error (RMSE) between the predicted and experimental datasets.

EXPERIMENTAL DATA
Merouani et al. 47,48 developed the ANN-PSO model by assessing the removal kinetics of RG12 and TB dyes from aqueous solutions under different experimental settings, utilizing the Fe(II)/chlorine and H 2 O 2 /periodate oxidation systems, respectively. The testing methodology and data are summarized in Text S1 in the Supporting Information.
For the Fe(II)/chlorine system, 146 datasets were collected from the experimental assessment of the removal kinetics of   51,53,54 Neurons (or nodes) are essential computer components used in parallel computing. 53−55 Neurons work together to detect input data sets commonly seen. 56 (35) f is the transfer function; x j is the neuron's inputs; and w ij is the link between IL and HL (weights) and the HL's threshold of j neuron. 50,53 Constructing and training neuronal networks has as its primary goal the minimization of the objective function (or fitness function), which in turn leads to better predictions for new input. 52,57 The latter compares the output and experimental data sets to determine how well the network operates. The fitness (error) function may thus be written as follows: N is the number of experiments, and y i and y o are the calculated and experimental data, respectively. 57 3.2. Particle Swarm Optimization. It is a nature-inspired evolutionary computing technology based on the movement and intelligence of swarms, such as ants and birds. 38 Kennedy and Eberhart created PSO in 1995 as a resilient stochastic optimization approach. Numerous optimization problems, such as function optimization, fuzzy control, and pattern recognition, have been solved using this approach. 58,59 Arbitrary particles, also known as solutions, are supported by the PSO algorithm. The search space (or the state space) is transformed into a swarm that seeks only the most advantageous options. The PSO training iteration uses the experience of individual particles and those around them to adjust their position and speed.
V id n + 1 is the new velocity; Pbest id n is the best position of the particle during training; Gbest id n is the best position among all the particles in the swarm during the training iteration. The cognitive influence is Pbest id n − X id n and the social influence is Gbest id n − X id n . c 1 and c 2 (acceleration constants) are the cognition and social weights, respectively.
w is the inertia weight (or inertia constant). 60 rand 1 and rand 2 generate random values ranging from 0 to 1. An example of the standard flow chart for the PSO approach may be seen in Figure S3 (Supporting Information).
The fundamental idea behind the PSO approach is that each particle is accelerated toward its Pbest id n and Gbest id n positions at each iteration.
When searching for the k-dimension and m-size of the acceleration, each particle may be represented as follows: Figure S4 in the Supporting Information).
3.3. PSO Approach. Analysis of state space is carried out by using a collection of particles. Weights and thresholds are stored in each particle for later adjustment. 39 Figure S5 of the Supporting Information shows the crucial phases of the ANN-PSO hybrid algorithm.
1. Importing experimental data. 2. Define ANN structure, weights, and thresholds. 3. Compute the number of weights and thresholds:      8. If f(X id n + 1 ) < f(Gbest id n ) Then Gbest id n + 1 = X id n + 1 Else Gbest id n + 1 = Gbest id n 9. The ANN parameters' results are shown (weights, thresholds). Table 1 illustrates how the 146 experimental datasets for the Fe(II)/ chlorine system and the 169 H 2 O 2 /periodate system were split into 70% training, 15% testing, and 15% validation. Initial solution pH, initial chlorine (or H 2 O 2 ) concentration, initial Fe(II) (or periodate) concentration, initial RG12 (or TB) concentration, and initial liquid temperature are all factors in the IL. The removal efficiency of RG12 (or TP) is saved in the OL (see Table 2).

Database and Termination Criteria.
To evaluate or confirm the algorithm's halting conditions, the stopping criteria of this algorithm is considered or validated when the maximum number of iteration or minimum RMSE is attained.

RESULTS AND DISCUSSION
It is feasible to assess whether or not the mathematical model's predictions stand up under investigation using experimental data. Training the ANN-PSO hybrid model necessitates altering the number of neurons in the intermediate. Transfer functions are sigmoid in both the HL and OL. Most optimization strategies use it as a fitness function when assessing the proposed model's training performance. We are searching for parameters (weights and thresholds) that minimize the objective function (RMSE) between the anticipated outcomes of our models and the experimental datasets.
The best optimal parameters were c 1 and c 2 , of 1.25 and 2.5, respectively. w = 0.15; maximum number of iterations = 4500, and swarm size is 15: • Fifty-five weights, w ij (11 × 5) correlating IL with HL.
• One threshold θ j for the OL (see Table 3).
Consequently, a 5:11:1 network (three layers) is the ultimate architectural network (i.e., five nodes in the IL, one HL with eleven nodes, and one node in the OL, respectively). After each training iteration, two variables, Pbest and Gbest, determine how each solution changes its position and velocity. The RMSE objective function assesses the model's prediction ability by minimizing the difference between the actual and predicted data sets. As seen in Figure 1a, the ANN-PSO hybrid model presents and updates parameters (weights and thresholds) following its objective function, determining the output datasets throughout training. In Figure 1b, it can be seen how a network's performance is evaluated when training is completed using a network test. Data sets for RG12 removal from wastewater treatment concentrations are forecasted using network validation in Figure 1c. Figure 1 demonstrates the network output from the proposed mathematical ANN-PSO model, and the experimental data sets for the three stages (training, testing, and validation) generated using MATLAB software. The practical data sets were classified into three types: training data sets (70%), testing data sets (15%), and validation data sets (15%). For the three phases, the coefficients of determination (R 2 ) are 0.99975, 0.99993, and 0.99987. The RMSE for each stage (training, testing, and validation) is 0.00181, 0.00084, and 0.00129, respectively. These statistics demonstrate strong performance across all data sets, with (R 2 ) values closer to unity and an RMSE less than 0.0012. This shows that all data fall along a 45-degree line with a slope = 1. The network outputs generated by the ANN-PSO hybrid model and relevant experimental data sets have the same linear connection (perfect correlation, "Perfect fit").  Table 4 shows the most optimum parameters of the ANN model derived using the PSO method (c 1 and c 2 equal to 1.25  They are distributed as follows: • w ij (70 = 14 × 5) correlating IL with HL.
The final architectural network is three layers: (5:14:1) network. Figure 2 depicts the proposed mathematical ANN-PSO model's network output and the associated experimental data sets for the system H 2 O 2 /period throughout the three stages (training, testing, and validation) using MATLAB software. The practical data sets were classified into three types: training data sets (70%), testing data sets (15%), and validation data sets (15%).
The coefficient of determination, R 2 , was 0.99908, 0.9963, and 0.99823 for the three stages, respectively. The RMSE values for the three stages (training, testing, and validation) were 0.00174, 0.00350, and 0.00273, respectively. It is determined that the correlation is perfect because R 2 is near one and RMSE values are less than 0.0018. Figures 3 and 4 compare the numerically simulated RG12 and TB removal (i.e., RG12 removal and TB Removal datasets) to the experimental data sets. The best fitting of the experimental data was also obtained for the two cases, revealing the ability of the ANN-PSO model toward predicting RG12 and TB removal.
For new RG12 data sets, Fe(II)/chlorine and H 2 O 2 / periodate processes were predicted more precisely using the ANN-PSO model. Table 5.
It can be concluded that the experimental and simulated findings agreed very well.

CONCLUSIONS
This work investigates the use of a new approach based on an ANN and PSO method to remove RG12 and TB dyes from wastewater utilizing Fe(II)/chlorine and H 2 O 2 /periodate oxidation processes. The ANN training function adjusts the weights and threshold values according to the PSO approach. The use of MATLAB software carried out the results. The coefficient of determination (R 2 ) from the ANN-PSO hybrid mathematical model topped 0.99 for three distinct ratio data sets from two independent systems. The proposed ANN-PSO model effectively predicts new RG12 and TB removal data sets with high (R 2 ) and low RMSE values.